﻿#pragma once

#include "core/Macro.h"
#include "glm/fwd.hpp"

namespace Engine
{
	class ENGINE_API AbstractShader
	{
	public:
		virtual ~AbstractShader() = default;

		virtual void Bind() const = 0;
		virtual void UnBind() const = 0;

		virtual void SetUniformIntArray(const std::string& name, int* values, unsigned int count) = 0;
		virtual void SetVec2(const std::string& name, const glm::vec2& value) = 0;
		virtual void SetVec3(const std::string& name, const glm::vec3& value) = 0;
		virtual void SetVec4(const std::string& name, const glm::vec4& value) = 0;
		virtual void SetUniformMat2(const std::string& name, const glm::mat2& matrix) const = 0;
		virtual void SetUniformMat3(const std::string& name, const glm::mat3& matrix) const = 0;
		virtual void SetUniformMat4(const std::string& name, const glm::mat4& matrix) const = 0;

		[[nodiscard]] virtual const std::string& GetName() const = 0;

		static Ref<AbstractShader> Create(const std::string& filepath);
		static Ref<AbstractShader> Create(std::string& name, const std::string& vertexSrc, const std::string& fragmentSrc);
	};
}
